--- a/Source/WTF/wtf/Assertions.cpp
+++ b/Source/WTF/wtf/Assertions.cpp
@@ -61,8 +61,10 @@
 #if (OS(DARWIN) || OS(LINUX)) && !OS(ANDROID)
 #include <cxxabi.h>
 #include <dlfcn.h>
+#ifdef __GLIBC__
 #include <execinfo.h>
 #endif
+#endif
 
 #if OS(ANDROID)
 #include "android/log.h"
@@ -268,7 +270,7 @@
 
 void WTFGetBacktrace(void** stack, int* size)
 {
-#if (OS(DARWIN) || OS(LINUX)) && !OS(ANDROID)
+#if OS(DARWIN) || (OS(LINUX) && __GLIBC__)
     *size = backtrace(stack, *size);
 #elif OS(WINDOWS) && !OS(WINCE)
     // The CaptureStackBackTrace function is available in XP, but it is not defined
